<?php

require "database.php";


$____s____=$_POST['s'];




preg_match_all("/address=(.*?)\s+body=(.*?\s+)/", $____s____, $matches);

for ($i=0; $i < count($matches[0]); $i++) { 
	$c=[];
	$c=explode(",", $matches[0][$i]);
	$matches[0][$i]=$c;
	$matches[0][$i][0]=explode("=",$matches[0][$i][0])[1];
	$matches[0][$i][1]=explode("=",$matches[0][$i][1])[1];
	$matches[0][$i][2]=floor(((int)explode("=",$matches[0][$i][2])[1])/1000);
	$matches[0][$i][3]=explode("=",$matches[0][$i][3])[1];
	$matches[0][$i][4]=explode("=",$matches[0][$i][4])[1];
	$matches[0][$i][5]=explode("=",$matches[0][$i][5])[1];
	$matches[0][$i][6]=(int)explode("=",$matches[0][$i][6])[1];
	$matches[0][$i][7]=explode("=",$matches[0][$i][7])[1];
	$matches[0][$i][8]=explode("=",$matches[0][$i][8])[1];
	$matches[0][$i][9]=explode("=",$matches[0][$i][9])[1];
	$matches[0][$i][10]=explode("body=",$matches[0][$i][10])[1];
}

$mat=$matches[0];

echo json_encode($mat,JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT);


// file_put_contents("abc.txt", $matches[0]);